package com.dormitory.dao;

import com.dormitory.po.Building;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BuildingDao {
    //获取总条数
    Integer totalCount(@Param("d_dormbuilding") String d_dormbuilding,
                       @Param("a_name") String a_name);

    //获取楼的列表
    List<Building> getBuildingList(@Param("d_dormbuilding") String d_dormbuilding,
                                   @Param("a_name") String a_name, @Param("currentPage") Integer currentPage,
                                   @Param("pageSize") Integer pageSize);

    int addBuilding(Building building);

    int deleteBuilding(Integer d_id);

    int updateBuilding(Building building);

    Building findBuildingById(Integer d_id);

    List<Building> getAll();
}
